package com.suixinsanren.design.decoration.demo03;

import org.junit.Test;

public class StarBuzzCoffee {

    @Test
    public void test03() {
        Beverage beverage = new HouseBlend();
        beverage = new Soy(beverage);
        beverage = new Mocha(beverage);
        beverage = new Whip(beverage);
        System.out.println(beverage.getDescription() + " $" + String.format("%.2f", beverage.cost()));
    }

    @Test
    public void test02() {
        Beverage beverage = new DarkRoast();
        beverage = new Mocha(beverage);
        beverage = new Mocha(beverage);
        beverage = new Whip(beverage);
        System.out.println(beverage.getDescription() + " $" + String.format("%.2f", beverage.cost()));
    }

    @Test
    public void test01() {
        Beverage beverage = new Espresso();
        System.out.println(beverage.getDescription() + " $" + String.format("%.2f", beverage.cost()));
    }
}
